package a;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
@Aspect
@Order(2)
public class Aspect2 {
    @Around("execution(public void a.TestService.test())")
    public Object secondLog(ProceedingJoinPoint pjp){
        Object rtValue = null;
        try{
            Object[] args = pjp.getArgs();
            rtValue = pjp.proceed(args);        // execute method
            System.out.println("第二个around执行");
            return rtValue;
        }catch (Throwable t){
            throw new RuntimeException(t);
        }finally {
        }
    }
}
